package top.lisicheng.openfeign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import top.lisicheng.model.CommonResult;

/**
 * @author Lisicheng
 */
@Component
@FeignClient(value = "CLOUD-PAYMENT-HYSTRIX-SERVICE",fallback = PaymentApiCallBack.class)
public interface PaymentApi {

    @GetMapping("/payment/get")
    CommonResult get(@RequestParam("id") Long id);

    @RequestMapping("/payment/timeout")
    CommonResult timeout();
}
